package com.ruoyi.qsng.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.uuid.SnowFlakeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qsng.mapper.KUsersInformationMapper;
import com.ruoyi.qsng.domain.KUsersInformation;
import com.ruoyi.qsng.service.IKUsersInformationService;

/**
 * 报名信息Service业务层处理
 * 
 * @author kanglou
 * @date 2023-06-07
 */
@Service
public class KUsersInformationServiceImpl implements IKUsersInformationService 
{
    @Autowired
    private KUsersInformationMapper kUsersInformationMapper;

    /**
     * 查询报名信息
     * 
     * @param id 报名信息主键
     * @return 报名信息
     */
    @Override
    public KUsersInformation selectKUsersInformationById(String id)
    {
        return kUsersInformationMapper.selectKUsersInformationById(id);
    }

    /**
     * 查询报名信息列表
     * 
     * @param kUsersInformation 报名信息
     * @return 报名信息
     */
    @Override
    public List<KUsersInformation> selectKUsersInformationList(KUsersInformation kUsersInformation)
    {
        return kUsersInformationMapper.selectKUsersInformationList(kUsersInformation);
    }

    /**
     * 新增报名信息
     * 
     * @param kUsersInformation 报名信息
     * @return 结果
     */
    @Override
    public int insertKUsersInformation(KUsersInformation kUsersInformation)
    {
        kUsersInformation.setId(SnowFlakeUtil.getNextId());
        kUsersInformation.setCreateTime(DateUtils.getNowDate());
        return kUsersInformationMapper.insertKUsersInformation(kUsersInformation);
    }

    /**
     * 修改报名信息
     * 
     * @param kUsersInformation 报名信息
     * @return 结果
     */
    @Override
    public int updateKUsersInformation(KUsersInformation kUsersInformation)
    {
        kUsersInformation.setUpdateTime(DateUtils.getNowDate());
        return kUsersInformationMapper.updateKUsersInformation(kUsersInformation);
    }

    /**
     * 批量删除报名信息
     * 
     * @param ids 需要删除的报名信息主键
     * @return 结果
     */
    @Override
    public int deleteKUsersInformationByIds(String[] ids)
    {
        return kUsersInformationMapper.deleteKUsersInformationByIds(ids);
    }

    /**
     * 删除报名信息信息
     * 
     * @param id 报名信息主键
     * @return 结果
     */
    @Override
    public int deleteKUsersInformationById(String id)
    {
        return kUsersInformationMapper.deleteKUsersInformationById(id);
    }
}
